#define _CRT_SECURE_NO_WARNINGS 1

truct ListNode* deleteMiddle(struct ListNode* head) {
    struct ListNode* fast = head;
    struct ListNode* slow = head;
    struct ListNode* mid = NULL;
    if (fast->next == NULL)
    {
        head = NULL;
        return head;
    }
    while (fast && fast->next)
    {
        fast = fast->next->next;
        mid = slow;
        slow = slow->next;

    }
    mid->next = slow->next;
    free(slow);

    return head;
}